3.57 \(\int \frac{\csc (e+f x)}{(a+b \sec ^2(e+f x))^3} \, dx\)

Optimal. Leaf size=154 \[ \frac{\sqrt{b} \left (15 a^2+10 a b+3 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{a} \cos (e+f x)}{\sqrt{b}}\right )}{8 a^{5/2} f (a+b)^3}-\frac{b (7 a+3 b) \cos (e+f x)}{8 a^2 f (a+b)^2 \left (a \cos ^2(e+f x)+b\right )}-\frac{b \cos ^3(e+f x)}{4 a f (a+b) \left (a \cos ^2(e+f x)+b\right )^2}-\frac{\tanh ^{-1}(\cos (e+f x))}{f (a+b)^3} \]

[Out]

(Sqrt[b]*(15*a^2 + 10*a*b + 3*b^2)*ArcTan[(Sqrt[a]*Cos[e + f*x])/Sqrt[b]])/(8*a^(5/2)*(a + b)^3*f) - ArcTanh[C
os[e + f*x]]/((a + b)^3*f) - (b*Cos[e + f*x]^3)/(4*a*(a + b)*f*(b + a*Cos[e + f*x]^2)^2) - (b*(7*a + 3*b)*Cos[
e + f*x])/(8*a^2*(a + b)^2*f*(b + a*Cos[e + f*x]^2))

________________________________________________________________________________________

Rubi [A]  time = 0.196444, antiderivative size = 154, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {4133, 470, 578, 522, 206, 205} \[ \frac{\sqrt{b} \left (15 a^2+10 a b+3 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{a} \cos (e+f x)}{\sqrt{b}}\right )}{8 a^{5/2} f (a+b)^3}-\frac{b (7 a+3 b) \cos (e+f x)}{8 a^2 f (a+b)^2 \left (a \cos ^2(e+f x)+b\right )}-\frac{b \cos ^3(e+f x)}{4 a f (a+b) \left (a \cos ^2(e+f x)+b\right )^2}-\frac{\tanh ^{-1}(\cos (e+f x))}{f (a+b)^3} \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]/(a + b*Sec[e + f*x]^2)^3,x]

[Out]

(Sqrt[b]*(15*a^2 + 10*a*b + 3*b^2)*ArcTan[(Sqrt[a]*Cos[e + f*x])/Sqrt[b]])/(8*a^(5/2)*(a + b)^3*f) - ArcTanh[C
os[e + f*x]]/((a + b)^3*f) - (b*Cos[e + f*x]^3)/(4*a*(a + b)*f*(b + a*Cos[e + f*x]^2)^2) - (b*(7*a + 3*b)*Cos[
e + f*x])/(8*a^2*(a + b)^2*f*(b + a*Cos[e + f*x]^2))

Rule 4133

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = F
reeFactors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*(ff*x)^n)^p)/(ff*x)^(n*
p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p
]

Rule 470

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> -Simp[(a*e^(2
*n - 1)*(e*x)^(m - 2*n + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(b*n*(b*c - a*d)*(p + 1)), x] + Dist[e^(2
*n)/(b*n*(b*c - a*d)*(p + 1)), Int[(e*x)^(m - 2*n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[a*c*(m - 2*n + 1) +
(a*d*(m - n + n*q + 1) + b*c*n*(p + 1))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[n, 0] && LtQ[p, -1] && GtQ[m - n + 1, n] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 578

Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_)*((e_) + (f_.)*(x_)^(n_)), x
_Symbol] :> Simp[(g^(n - 1)*(b*e - a*f)*(g*x)^(m - n + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(b*n*(b*c -
 a*d)*(p + 1)), x] - Dist[g^n/(b*n*(b*c - a*d)*(p + 1)), Int[(g*x)^(m - n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*S
imp[c*(b*e - a*f)*(m - n + 1) + (d*(b*e - a*f)*(m + n*q + 1) - b*n*(c*f - d*e)*(p + 1))*x^n, x], x], x] /; Fre
eQ[{a, b, c, d, e, f, g, q}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m - n + 1, 0]

Rule 522

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\csc (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{x^6}{\left (1-x^2\right ) \left (b+a x^2\right )^3} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{b \cos ^3(e+f x)}{4 a (a+b) f \left (b+a \cos ^2(e+f x)\right )^2}+\frac{\operatorname{Subst}\left (\int \frac{x^2 \left (3 b+(-4 a-3 b) x^2\right )}{\left (1-x^2\right ) \left (b+a x^2\right )^2} \, dx,x,\cos (e+f x)\right )}{4 a (a+b) f}\\ &=-\frac{b \cos ^3(e+f x)}{4 a (a+b) f \left (b+a \cos ^2(e+f x)\right )^2}-\frac{b (7 a+3 b) \cos (e+f x)}{8 a^2 (a+b)^2 f \left (b+a \cos ^2(e+f x)\right )}+\frac{\operatorname{Subst}\left (\int \frac{b (7 a+3 b)+\left (-8 a^2-7 a b-3 b^2\right ) x^2}{\left (1-x^2\right ) \left (b+a x^2\right )} \, dx,x,\cos (e+f x)\right )}{8 a^2 (a+b)^2 f}\\ &=-\frac{b \cos ^3(e+f x)}{4 a (a+b) f \left (b+a \cos ^2(e+f x)\right )^2}-\frac{b (7 a+3 b) \cos (e+f x)}{8 a^2 (a+b)^2 f \left (b+a \cos ^2(e+f x)\right )}-\frac{\operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\cos (e+f x)\right )}{(a+b)^3 f}+\frac{\left (b \left (15 a^2+10 a b+3 b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{b+a x^2} \, dx,x,\cos (e+f x)\right )}{8 a^2 (a+b)^3 f}\\ &=\frac{\sqrt{b} \left (15 a^2+10 a b+3 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{a} \cos (e+f x)}{\sqrt{b}}\right )}{8 a^{5/2} (a+b)^3 f}-\frac{\tanh ^{-1}(\cos (e+f x))}{(a+b)^3 f}-\frac{b \cos ^3(e+f x)}{4 a (a+b) f \left (b+a \cos ^2(e+f x)\right )^2}-\frac{b (7 a+3 b) \cos (e+f x)}{8 a^2 (a+b)^2 f \left (b+a \cos ^2(e+f x)\right )}\\ \end{align*}

Mathematica [C]  time = 2.61918, size = 447, normalized size = 2.9 \[ \frac{\sec ^5(e+f x) (a \cos (2 (e+f x))+a+2 b) \left (\frac{\sqrt{b} \left (15 a^2+10 a b+3 b^2\right ) \sec (e+f x) (a \cos (2 (e+f x))+a+2 b)^2 \tan ^{-1}\left (\frac{\sin (e) \tan \left (\frac{f x}{2}\right ) \left (-\sqrt{a}-i \sqrt{a+b} \sqrt{(\cos (e)-i \sin (e))^2}\right )+\cos (e) \left (\sqrt{a}-\sqrt{a+b} \sqrt{(\cos (e)-i \sin (e))^2} \tan \left (\frac{f x}{2}\right )\right )}{\sqrt{b}}\right )}{a^{5/2}}+\frac{\sqrt{b} \left (15 a^2+10 a b+3 b^2\right ) \sec (e+f x) (a \cos (2 (e+f x))+a+2 b)^2 \tan ^{-1}\left (\frac{\sin (e) \tan \left (\frac{f x}{2}\right ) \left (-\sqrt{a}+i \sqrt{a+b} \sqrt{(\cos (e)-i \sin (e))^2}\right )+\cos (e) \left (\sqrt{a}+\sqrt{a+b} \sqrt{(\cos (e)-i \sin (e))^2} \tan \left (\frac{f x}{2}\right )\right )}{\sqrt{b}}\right )}{a^{5/2}}+\frac{8 b^2 (a+b)^2}{a^2}-\frac{2 b (9 a+5 b) (a+b) (a \cos (2 (e+f x))+a+2 b)}{a^2}-8 \sec (e+f x) \log \left (\cos \left (\frac{1}{2} (e+f x)\right )\right ) (a \cos (2 (e+f x))+a+2 b)^2+8 \sec (e+f x) \log \left (\sin \left (\frac{1}{2} (e+f x)\right )\right ) (a \cos (2 (e+f x))+a+2 b)^2\right )}{64 f (a+b)^3 \left (a+b \sec ^2(e+f x)\right )^3} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]/(a + b*Sec[e + f*x]^2)^3,x]

[Out]

((a + 2*b + a*Cos[2*(e + f*x)])*Sec[e + f*x]^5*((8*b^2*(a + b)^2)/a^2 - (2*b*(a + b)*(9*a + 5*b)*(a + 2*b + a*
Cos[2*(e + f*x)]))/a^2 + (Sqrt[b]*(15*a^2 + 10*a*b + 3*b^2)*ArcTan[((-Sqrt[a] - I*Sqrt[a + b]*Sqrt[(Cos[e] - I
*Sin[e])^2])*Sin[e]*Tan[(f*x)/2] + Cos[e]*(Sqrt[a] - Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2]*Tan[(f*x)/2]))/Sq
rt[b]]*(a + 2*b + a*Cos[2*(e + f*x)])^2*Sec[e + f*x])/a^(5/2) + (Sqrt[b]*(15*a^2 + 10*a*b + 3*b^2)*ArcTan[((-S
qrt[a] + I*Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2])*Sin[e]*Tan[(f*x)/2] + Cos[e]*(Sqrt[a] + Sqrt[a + b]*Sqrt[(
Cos[e] - I*Sin[e])^2]*Tan[(f*x)/2]))/Sqrt[b]]*(a + 2*b + a*Cos[2*(e + f*x)])^2*Sec[e + f*x])/a^(5/2) - 8*(a +
2*b + a*Cos[2*(e + f*x)])^2*Log[Cos[(e + f*x)/2]]*Sec[e + f*x] + 8*(a + 2*b + a*Cos[2*(e + f*x)])^2*Log[Sin[(e
 + f*x)/2]]*Sec[e + f*x]))/(64*(a + b)^3*f*(a + b*Sec[e + f*x]^2)^3)

________________________________________________________________________________________

Maple [B]  time = 0.099, size = 352, normalized size = 2.3 \begin{align*} -{\frac{\ln \left ( 1+\cos \left ( fx+e \right ) \right ) }{2\,f \left ( a+b \right ) ^{3}}}-{\frac{9\,ab \left ( \cos \left ( fx+e \right ) \right ) ^{3}}{8\,f \left ( a+b \right ) ^{3} \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}-{\frac{7\,{b}^{2} \left ( \cos \left ( fx+e \right ) \right ) ^{3}}{4\,f \left ( a+b \right ) ^{3} \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}-{\frac{5\,{b}^{3} \left ( \cos \left ( fx+e \right ) \right ) ^{3}}{8\,f \left ( a+b \right ) ^{3} \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}a}}-{\frac{7\,{b}^{2}\cos \left ( fx+e \right ) }{8\,f \left ( a+b \right ) ^{3} \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}-{\frac{5\,{b}^{3}\cos \left ( fx+e \right ) }{4\,f \left ( a+b \right ) ^{3} \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}a}}-{\frac{3\,{b}^{4}\cos \left ( fx+e \right ) }{8\,f \left ( a+b \right ) ^{3} \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}{a}^{2}}}+{\frac{15\,b}{8\,f \left ( a+b \right ) ^{3}}\arctan \left ({a\cos \left ( fx+e \right ){\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{\frac{5\,{b}^{2}}{4\,f \left ( a+b \right ) ^{3}a}\arctan \left ({a\cos \left ( fx+e \right ){\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{\frac{3\,{b}^{3}}{8\,f \left ( a+b \right ) ^{3}{a}^{2}}\arctan \left ({a\cos \left ( fx+e \right ){\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{\frac{\ln \left ( -1+\cos \left ( fx+e \right ) \right ) }{2\,f \left ( a+b \right ) ^{3}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)/(a+b*sec(f*x+e)^2)^3,x)

[Out]

-1/2/f/(a+b)^3*ln(1+cos(f*x+e))-9/8/f*b/(a+b)^3/(b+a*cos(f*x+e)^2)^2*a*cos(f*x+e)^3-7/4/f*b^2/(a+b)^3/(b+a*cos
(f*x+e)^2)^2*cos(f*x+e)^3-5/8/f*b^3/(a+b)^3/(b+a*cos(f*x+e)^2)^2/a*cos(f*x+e)^3-7/8/f*b^2/(a+b)^3/(b+a*cos(f*x
+e)^2)^2*cos(f*x+e)-5/4/f*b^3/(a+b)^3/(b+a*cos(f*x+e)^2)^2/a*cos(f*x+e)-3/8/f*b^4/(a+b)^3/(b+a*cos(f*x+e)^2)^2
/a^2*cos(f*x+e)+15/8/f*b/(a+b)^3/(a*b)^(1/2)*arctan(a*cos(f*x+e)/(a*b)^(1/2))+5/4/f*b^2/(a+b)^3/a/(a*b)^(1/2)*
arctan(a*cos(f*x+e)/(a*b)^(1/2))+3/8/f*b^3/(a+b)^3/a^2/(a*b)^(1/2)*arctan(a*cos(f*x+e)/(a*b)^(1/2))+1/2/f/(a+b
)^3*ln(-1+cos(f*x+e))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)/(a+b*sec(f*x+e)^2)^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.00985, size = 1773, normalized size = 11.51 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)/(a+b*sec(f*x+e)^2)^3,x, algorithm="fricas")

[Out]

[-1/16*(2*(9*a^3*b + 14*a^2*b^2 + 5*a*b^3)*cos(f*x + e)^3 - ((15*a^4 + 10*a^3*b + 3*a^2*b^2)*cos(f*x + e)^4 +
15*a^2*b^2 + 10*a*b^3 + 3*b^4 + 2*(15*a^3*b + 10*a^2*b^2 + 3*a*b^3)*cos(f*x + e)^2)*sqrt(-b/a)*log(-(a*cos(f*x
 + e)^2 + 2*a*sqrt(-b/a)*cos(f*x + e) - b)/(a*cos(f*x + e)^2 + b)) + 2*(7*a^2*b^2 + 10*a*b^3 + 3*b^4)*cos(f*x
+ e) + 8*(a^4*cos(f*x + e)^4 + 2*a^3*b*cos(f*x + e)^2 + a^2*b^2)*log(1/2*cos(f*x + e) + 1/2) - 8*(a^4*cos(f*x
+ e)^4 + 2*a^3*b*cos(f*x + e)^2 + a^2*b^2)*log(-1/2*cos(f*x + e) + 1/2))/((a^7 + 3*a^6*b + 3*a^5*b^2 + a^4*b^3
)*f*cos(f*x + e)^4 + 2*(a^6*b + 3*a^5*b^2 + 3*a^4*b^3 + a^3*b^4)*f*cos(f*x + e)^2 + (a^5*b^2 + 3*a^4*b^3 + 3*a
^3*b^4 + a^2*b^5)*f), -1/8*((9*a^3*b + 14*a^2*b^2 + 5*a*b^3)*cos(f*x + e)^3 - ((15*a^4 + 10*a^3*b + 3*a^2*b^2)
*cos(f*x + e)^4 + 15*a^2*b^2 + 10*a*b^3 + 3*b^4 + 2*(15*a^3*b + 10*a^2*b^2 + 3*a*b^3)*cos(f*x + e)^2)*sqrt(b/a
)*arctan(a*sqrt(b/a)*cos(f*x + e)/b) + (7*a^2*b^2 + 10*a*b^3 + 3*b^4)*cos(f*x + e) + 4*(a^4*cos(f*x + e)^4 + 2
*a^3*b*cos(f*x + e)^2 + a^2*b^2)*log(1/2*cos(f*x + e) + 1/2) - 4*(a^4*cos(f*x + e)^4 + 2*a^3*b*cos(f*x + e)^2
+ a^2*b^2)*log(-1/2*cos(f*x + e) + 1/2))/((a^7 + 3*a^6*b + 3*a^5*b^2 + a^4*b^3)*f*cos(f*x + e)^4 + 2*(a^6*b +
3*a^5*b^2 + 3*a^4*b^3 + a^3*b^4)*f*cos(f*x + e)^2 + (a^5*b^2 + 3*a^4*b^3 + 3*a^3*b^4 + a^2*b^5)*f)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)/(a+b*sec(f*x+e)**2)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.27685, size = 844, normalized size = 5.48 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)/(a+b*sec(f*x+e)^2)^3,x, algorithm="giac")

[Out]

-1/8*((15*a^2*b + 10*a*b^2 + 3*b^3)*arctan(-(a*cos(f*x + e) - b)/(sqrt(a*b)*cos(f*x + e) + sqrt(a*b)))/((a^5 +
 3*a^4*b + 3*a^3*b^2 + a^2*b^3)*sqrt(a*b)) - 4*log(-(cos(f*x + e) - 1)/(cos(f*x + e) + 1))/(a^3 + 3*a^2*b + 3*
a*b^2 + b^3) + 2*(9*a^3*b + 21*a^2*b^2 + 15*a*b^3 + 3*b^4 + 27*a^3*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1
3*a^2*b^2*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 23*a*b^3*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 9*b^4*(cos(
f*x + e) - 1)/(cos(f*x + e) + 1) + 27*a^3*b*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 9*a^2*b^2*(cos(f*x + e
) - 1)^2/(cos(f*x + e) + 1)^2 + 21*a*b^3*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 9*b^4*(cos(f*x + e) - 1)^
2/(cos(f*x + e) + 1)^2 + 9*a^3*b*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 - a^2*b^2*(cos(f*x + e) - 1)^3/(cos
(f*x + e) + 1)^3 - 13*a*b^3*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 - 3*b^4*(cos(f*x + e) - 1)^3/(cos(f*x +
e) + 1)^3)/((a^5 + 3*a^4*b + 3*a^3*b^2 + a^2*b^3)*(a + b + 2*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 2*b*(co
s(f*x + e) - 1)/(cos(f*x + e) + 1) + a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + b*(cos(f*x + e) - 1)^2/(cos
(f*x + e) + 1)^2)^2))/f